package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.Product;
import cn.wolfcode.trip.base.query.ProductQueryObject;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface IProductService {
    PageInfo<Product> queryProduct(ProductQueryObject qo);

    void saveOrUpdate(Product entity);

    Product getProductById(Long id);

    /**
     * 查看商品信息
     * @param id
     * @return
     */
    String getInfo(Long id);

    /**
     * 修改商品状态,下架
     * @param id
     * @param state
     */
    void changeState(Long id, Integer state);

    List<Product> getProductByType(Long productTypeId);

    List<Product> getNewProduct();
}
